home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h_doc / Validation < prev    next >
Text File  |  1996-05-21  |  2KB  |  52 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Validation.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (22 Mar 1992)
  14.     Purpose: Scanning of validation strings for various fields
  15. */
  16.  
  17.  
  18. #ifndef __Desk_Validation_h
  19. #define __Desk_Validation_h
  20.  
  21. #ifdef __cplusplus
  22.     extern "C" {
  23. #endif
  24.  
  25.  
  26.  
  27. extern int Desk_Validation_ScanString(const char *string, char tag);
  28. /*
  29.  * Scan the passed-in string for the special tag character, and return the
  30.  * index of the next char. e.g. scanning "a0-9;b3" for the bordertype can be
  31.  * done as follows:
  32.  *
  33.  * if (border = Desk_Icon_ScanValidString(icon.data.indirecttext.validstring, 'B'))
  34.  * {
  35.  *   border = icon.data.indirecttext.validstring[border] - '0';
  36.  *   switch (border)
  37.  *   ...
  38.  *
  39.  * If the tag is not found, a value of 0 will be returned, else the value
  40.  * is the index of the character FOLLOWING the tag in the string.
  41.  * (NOTE that the tag must be either the first character, or must directly
  42.  *  follow a semicolon)
  43.  *
  44.  */
  45.  
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49.  
  50.  
  51. #endif
  52.